<template>
  <div>
     <a-table :columns="columns" :data-source="data" :rowKey="(record,index)=>{return index}"  bordered>
          <template slot="name" slot-scope="text">
            <a href="javascript:;">{{text}}</a>
          </template>　
        </a-table>
  </div>
</template>

<script>
const columns = [
    {
      title: '用户ID',
      dataIndex: 'id',
      key: 'id',
    },
    {
      title: '用户名',
      dataIndex: 'username',
      // key: 'username',
    },
    {
      title: '密码',
      dataIndex: 'password',
      // key: 'password',
    },
];
export default {
  data () {
    return {
        data: [],
        collapsed: false,
        columns,
    };
  },
  methods: {
      getUser(){
      this.$axios.get('select/')
      .then(res=>{
        console.log(res.data);
        
        this.data=res.data
      })
    }
  },
  created() {
      this.getUser()
  }
}

</script>
<style>
     
</style>